Display Customer Loyalty Information

This use case describes how to enable a customer that wants to access and view their loyalty data via a program's dashboard or rewards page. Data includes attributes defined on the customer profile, as well as on the customer's timeline. A SessionM timeline is an event history comprised of event varying in type that can reflect a variety of custom actions such as "purchased" or "opened email." Because timelines are quite large, it's important to define a subset, or view, of it that reflects the use case being implemented.

The use case also details information on another typical component of a customer's loyalty data - the campaigns they are participating in.

Customer Journey

One helpful way of understanding this use case is to consider how it reflects the customer's experience, or journey, in the "real world."

Customer logs in to international coffee retail website and accesses client dashboard

Customer reviews profile showing incentives data, including current tier and points

Customer wants to review recent coffee purchase history and accesses loyalty ledger, or rewards page

Customer navigates to campaigns page to see all active and eligible campaigns from coffee retailer

Customer peruses campaigns and locates one of their active campaigns

Client middleware returns detailed information on selected coffee campaign

Customer requests information on their progress in campaign

Platform Configuration

Before implementing this use case, ensure the following have been configured:

Customers

Customer created.

Customer must be in a configured tier.

Customer may need additional events published to their timeline. Work with the SessionM team to configure these additions.

Points

Point Account and Point Source created.

Loyalty

Program design that has corresponding tiers system and related economy rules.

Campaigns

Necessary campaigns created.

Sequence Diagram

See the overall flow for this use case below.

CUSTOMER CUSTOMER CLIENT MIDDLEWARE CLIENT MIDDLEWARE SESSIONM SESSIONM GET CUSTOMER PROFILE 1 Log in to retailer website dashboard 2 Get customer profile with incentive data 3 Return customer profile 4 Parse profile attributes, along with tier and points data 5 Display customer profile data GET TIMELINE VIEW 6 Navigate to loyalty ledger page 7 Get timeline view 8 Return details on event history timeline 9 Evaluate information for display to customer 10 Display timeline information on customer events GET CAMPAIGN INFORMATION AND PROGRESS 11 Navigate to active campaigns page 12 Get active, eligbile campaigns 13 Return active, eligible campaigns 14 Display campaigns 15 Select campaign 16 Get active campaign information 17 Return details on active campaign 18 Display campaign information 19 Select campaign 20 Get progress information on campaign 21 Return details on campaign progress information 22 Display campaign progress information, including status

Alternative Path

In the diagram above, SessionM returns the profile object to the client middleware. At this point, middleware may do any number of calculations to parse the data it needs from the response object. One such calculation is the customer's point balance, a key part of understanding loyalty data. You may want to use endpoints from the UserPoints API for this purpose; more specifically, the GetBalance or the GetAllBalances endpoint.

Tasks

This use case diagram contains multiple tasks, each one depicted in its own color-coded section. For more information, see the overview below.

  1. Get Customer Profile (Use Case Events #1 - #4)

    Provides configurable way to get view of customer's profile data.

  2. Get Events Timeline View (Use Case Events #5 - #9)

    Provides configurable way to get view of customer's history in a timeline.

  3. Get Campaign Information and Progress (Use Case Events #10 - #21)

    Provides details on accessing eligible campaigns and retrieving basic information on a specific campaign, along with customer's progress within it.

Best Practices

In addition to their standard profile, customers are likely to have a custom profile - one that contains custom attributes. If these customers happen to have multiple external IDs, the data being retrieved might be returned in multiple responses. To avoid this and ensure that all of their data is returned in a single response, be sure to set the show_identifiers parameter to true when making the call to get their data. For more information, see the "API Endpoints & Constraints" section in the Get Customer Profile article.